<?php


namespace app\admin\model;

use app\admin\service\SystemLogWithToken;
use think\Model;

class Token extends Model
{
    use SystemLogWithToken;
    protected $table = 'jxc_token';

    protected static function init()
    {
        // 更新Token
        self::afterUpdate(function ($model) {
            self::log(['token' => $model->token]);
        });
        // 新建Token
        self::afterInsert(function ($model) {
            self::log(['token' => $model->token]);
        });
    }
}
